﻿Public MustInherit Class ProjectState

    Public Overridable Sub update(ByVal project As Project)
        ProjectDao.update(project)
        'MsgBox("El Estado del Proyecto no permite que éste sea Modificado", vbCritical, "Importante")
    End Sub

    Public Sub cancel(ByVal project As Project)
        project.stateProperty.idProperty = State.PROJECT_STATE_CANCEL_ID
        ProjectDao.update(project)
    End Sub

    Public Sub changeToInProcessState(ByVal project As Project)
        project.stateProperty.idProperty = State.PROJECT_STATE_IN_PROCESS_ID
        ProjectDao.update(project)
    End Sub

    Public Overridable Function isCanUpdate() As Boolean
        MsgBox("El Estado del Proyecto no permite que éste sea Modificado", vbCritical, "Importante")
        Return False
    End Function
End Class
